package com.thread.future;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

/**
 * 
 * completableFuture  
 */
public class FirstFutureTask {
	public static void main(String[] args) throws InterruptedException, ExecutionException {
		FutureTask<Long> task = new FutureTask<Long>(new FirstCallableTask("task",5));
		Thread thread = new Thread(task);
		thread.start();
		System.out.println(task.get());
	}
}
